home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 1 / ACE CD 1.iso / files / utils / acroarex.dms / in.adf / Public_Domain / PD_STUFF.lha / RexxIntuition / Scripts / Input.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1992-05-30  |  785 b   |  28 lines

  1. /* Example of INPUT() */
  2.  
  3. /* Get a ReqDef structure */
  4. rq=rxi_GetReq()
  5. IF rq == '' | rq == 0 THEN SAY 'ReqDef allocation error'
  6.  
  7. /* Open a window on WB. Let it be the default IDCMP. */
  8. wind=rxi_GetWindow('Using Input()',,,,,,,,,)
  9. IF wind == '' | wind == 0 THEN SAY 'Window open error'
  10.  
  11. /* Get the user's input via the title bar. Allow 8 characters. Initial the */
  12. /* input to "Jeff", and the prompt is "What is your name?" */
  13. response=rxi_Input(wind,rq,8,'What is your name? >','Jeff')
  14.  
  15. IF response > '' THEN DO
  16. /* OK. The user didn't type an empty string or press ESC */
  17. err=rxi_Text(response,wind,10,20)
  18. END
  19.  
  20. /* Free the ReqDef */
  21. rq=rxi_EndReq(rq)
  22.  
  23. /* Wait for ANY IDCMP */
  24. spec=rxi_WaitMsg(wind)
  25.  
  26. /* Close the window, thus freeing any resources for it. */
  27. wind=rxi_EndWindow(wind)
  28.